<me:VBPRULES x:Class="WPFExcelReport.TTWRULES"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"   
                    xmlns:AP="clr-namespace:WPFExcelReport;assembly=TAPKOPF" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:VBPRULES.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:VBPRULES.Resources>

    <StackPanel Grid.Row="0">
        <Grid >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition   Height="Auto"/>
            </Grid.RowDefinitions>
            <WrapPanel  Grid.Row="0">
                <TextBlock Text="{Binding Source={Localization:Translate Word=并线:}}"></TextBlock>
                <TextBlock  Grid.Column="1"   Text="{Binding Path=ORDERNUM}" 
                            Width="100" HorizontalAlignment="Left"/>
                <TextBlock  Text="{Binding FLOW,ElementName=TV}"
                        Visibility="{Binding IsEdit,ElementName=TV,Converter={StaticResource nbv}}"/>
                <AP:TSAP02 KRS="BX" ARTST="G"
                           dwAP="{Binding dwAP,ElementName=TV}" 
                          KEY ="{Binding FLOW,ElementName=TV}"   
                       WH="{Binding WH,ElementName=TV}"/>
            </WrapPanel>
        </Grid>
        <Grid  >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=并线交期}}"></TextBlock>
            <ex:NumericBox Grid.Column="1"  Text="{Binding Path=DELDATE}"  
                     Width="100"
                     HorizontalAlignment="Left"/>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=开始日期}}"></TextBlock>
            <ex:NumericBox  Grid.Column="1"   Text="{Binding Path=STARTDATE}" 
                            Width="100" HorizontalAlignment="Left"/>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=周期}}"></TextBlock>
            <ex:NumericBox  Grid.Column="1"   Text="{Binding Path=LEADTIME}" 
                     Width="40" HorizontalAlignment="Left"/>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=并线kg}}"></TextBlock>
            <ex:NumericBox  Grid.Column="1" Text="{Binding Path=QTYEND}"  HorizontalAlignment="Left" Width="80" />
        </Grid>
        <Grid >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=损耗}}"></TextBlock>
            <ex:NumericBox  Grid.Column="1" 
                     Text="{Binding Path=R01}"
                     Width="40" HorizontalAlignment="Left" />
        </Grid>
    </StackPanel>  
</me:VBPRULES>
